#include "YnbwException.hpp"

YnbwException::YnbwException() throw()
                            : exceptionNumber_(EXCEPTION_UNKNOWN)
{
FUNCTION
}

YnbwException::YnbwException(const int exceptionNumber) throw()
                            : exceptionNumber_(exceptionNumber)
{
FUNCTION
}

YnbwException::~YnbwException() throw()
{
FUNCTION
}

const int YnbwException::getExceptionNumber() const throw()
{
FUNCTION
  return exceptionNumber_;
}

const char *YnbwException::what() const throw()
{
FUNCTION
  switch(exceptionNumber_)
  {
    case EXCEPTION_SUCCESS:
      return "Operation successful";
      break;
    case EXCEPTION_UNKNOWN:
      return "Unknown error";
      break;
    case EXCEPTION_OUTOFMEMORY:
      return "Out of memory";
      break;
    case EXCEPTION_ASSERT:
      return "Exception Failed - You Broke It!!!";
      break;
    default:
      return "Bad Exception";
      break;
  }
}
